// 环境配置 开发 | 测试 | 生产
type ENV = 'dev' | 'stg' | 'prd';

// 获取html页面中的数据值
const env = document.documentElement.dataset.env as ENV || 'dev';

const config = {
    // 开发模式下配合 vie.config.js中得跨域
    dev:{
        baseApi:"/api",
        upLoadApi:"/upload",
        cdn:"http://api-driver-dev.marsview.cc",
        mock:false,
        mockApi:"https://www.fastmock.site/mock/5841b82d5672783b6a66aeb1f/ap1"
    },
    stg:{
        baseApi:"/api",
        upLoadApi:"/upload",
        cdn:"http://baidu.com",
        mock:false,
        mockApi:"https://www.fastmock.site/mock/5841b82d5672783b6a66aeb1f/ap1"
    },
    prd:{
        baseApi:"http://baidu.com/login",
        upLoadApi:"/upload",
        cdn:"http://baidu.com",
        mock:false,
        mockApi:"https://www.fastmock.site/mock/5841b82d5672783b6a66aeb1f/ap1"
    }
}

export default{
    env,...config[env]
}